/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package net.easoftware.code.beans.jpa;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
import net.easoftware.code.beans.maintenance.annotation.DataTableColumn;
import org.eclipse.persistence.annotations.NamedStoredProcedureQuery;

/**
 *
 * @author waumovil-javaengineer
 */
@Entity
@Table(name = "asoff_store")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "AsoffStore.findAll", query = "SELECT a FROM AsoffStore a"),
    @NamedQuery(name = "AsoffStore.findById", query = "SELECT a FROM AsoffStore a WHERE a.id = :id"),
    @NamedQuery(name = "AsoffStore.findByCompania", query = "SELECT a FROM AsoffStore a WHERE a.compania = :compania"),
    @NamedQuery(name = "AsoffStore.findByTdocto", query = "SELECT a FROM AsoffStore a WHERE a.tdocto = :tdocto"),
    @NamedQuery(name = "AsoffStore.findByNodocto", query = "SELECT a FROM AsoffStore a WHERE a.nodocto = :nodocto"),
    @NamedQuery(name = "AsoffStore.findByFechaemision", query = "SELECT a FROM AsoffStore a WHERE a.fechaemision = :fechaemision"),
    @NamedQuery(name = "AsoffStore.findByMontoorigen", query = "SELECT a FROM AsoffStore a WHERE a.montoorigen = :montoorigen"),
    @NamedQuery(name = "AsoffStore.findByMontopendiente", query = "SELECT a FROM AsoffStore a WHERE a.montopendiente = :montopendiente"),
    @NamedQuery(name = "AsoffStore.findByCliente", query = "SELECT a FROM AsoffStore a WHERE a.cliente = :cliente"),
    @NamedQuery(name = "AsoffStore.findByParent", query = "SELECT a FROM AsoffStore a WHERE a.parent = :parent"),
    @NamedQuery(name = "AsoffStore.findByNombre", query = "SELECT a FROM AsoffStore a WHERE a.nombre = :nombre"),
    @NamedQuery(name = "AsoffStore.findByMailing", query = "SELECT a FROM AsoffStore a WHERE a.mailing = :mailing"),
    @NamedQuery(name = "AsoffStore.findByName", query = "SELECT a FROM AsoffStore a WHERE a.name = :name"),
    @NamedQuery(name = "AsoffStore.findByCodigoRep", query = "SELECT a FROM AsoffStore a WHERE a.codigoRep = :codigoRep"),
    @NamedQuery(name = "AsoffStore.findByRepventas", query = "SELECT a FROM AsoffStore a WHERE a.repventas = :repventas"),
    @NamedQuery(name = "AsoffStore.findByZonaventas", query = "SELECT a FROM AsoffStore a WHERE a.zonaventas = :zonaventas"),
    @NamedQuery(name = "AsoffStore.findBySegmento", query = "SELECT a FROM AsoffStore a WHERE a.segmento = :segmento"),
    @NamedQuery(name = "AsoffStore.findByBu", query = "SELECT a FROM AsoffStore a WHERE a.bu = :bu"),
    @NamedQuery(name = "AsoffStore.findByGlOffset", query = "SELECT a FROM AsoffStore a WHERE a.glOffset = :glOffset"),
    @NamedQuery(name = "AsoffStore.findByProducto", query = "SELECT a FROM AsoffStore a WHERE a.producto = :producto"),
    @NamedQuery(name = "AsoffStore.findByDescproducto", query = "SELECT a FROM AsoffStore a WHERE a.descproducto = :descproducto"),
    @NamedQuery(name = "AsoffStore.findByCatcode29", query = "SELECT a FROM AsoffStore a WHERE a.catcode29 = :catcode29"),
    @NamedQuery(name = "AsoffStore.findByDecCc29", query = "SELECT a FROM AsoffStore a WHERE a.decCc29 = :decCc29"),
    @NamedQuery(name = "AsoffStore.findBySearchtype", query = "SELECT a FROM AsoffStore a WHERE a.searchtype = :searchtype"),
    @NamedQuery(name = "AsoffStore.findByPterm", query = "SELECT a FROM AsoffStore a WHERE a.pterm = :pterm"),
    @NamedQuery(name = "AsoffStore.findByCode", query = "SELECT a FROM AsoffStore a WHERE a.code = :code"),
    @NamedQuery(name = "AsoffStore.findByPaymentterms", query = "SELECT a FROM AsoffStore a WHERE a.paymentterms = :paymentterms"),
    @NamedQuery(name = "AsoffStore.findByCreditlimit", query = "SELECT a FROM AsoffStore a WHERE a.creditlimit = :creditlimit"),
    @NamedQuery(name = "AsoffStore.findByRanking", query = "SELECT a FROM AsoffStore a WHERE a.ranking = :ranking"),
    @NamedQuery(name = "AsoffStore.findByCredmessage", query = "SELECT a FROM AsoffStore a WHERE a.credmessage = :credmessage"),
    @NamedQuery(name = "AsoffStore.findByTempcrmessage", query = "SELECT a FROM AsoffStore a WHERE a.tempcrmessage = :tempcrmessage"),
    @NamedQuery(name = "AsoffStore.findByReferencia", query = "SELECT a FROM AsoffStore a WHERE a.referencia = :referencia"),
    @NamedQuery(name = "AsoffStore.findByComentario", query = "SELECT a FROM AsoffStore a WHERE a.comentario = :comentario"),
    @NamedQuery(name = "AsoffStore.findByOpenorders", query = "SELECT a FROM AsoffStore a WHERE a.openorders = :openorders"),
    @NamedQuery(name = "AsoffStore.findByRpcrrm", query = "SELECT a FROM AsoffStore a WHERE a.rpcrrm = :rpcrrm"),
    @NamedQuery(name = "AsoffStore.findByAbac05", query = "SELECT a FROM AsoffStore a WHERE a.abac05 = :abac05")})
@NamedStoredProcedureQuery(  
    name = "procesarAsOff",
procedureName = "procesarAsOff",
returnsResultSet = false)
public class AsoffStore implements Serializable {

    @Column(name = "fechavencimiento")
    @Temporal(TemporalType.DATE)
    private Date fechavencimiento;
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @DataTableColumn(order = 1, title = "Compania", name = "compania")
    @Column(name = "compania")
    private Integer compania;
    @DataTableColumn(order = 2, title = "Tipo Docto.", name = "tdocto")
    @Size(max = 45)
    @Column(name = "tdocto")
    private String tdocto;
    @DataTableColumn(order = 3, title = "No. Docto", name = "nodocto")
    @Size(max = 45)
    @Column(name = "nodocto")
    private String nodocto;
    @DataTableColumn(order = 4, title = "Fecha Emision", name = "fechaemision")
    @Column(name = "fechaemision")
    @Temporal(TemporalType.DATE)
    private Date fechaemision;
    @DataTableColumn(order = 5, title = "Monto Origen", name = "montoorigen")
    @Column(name = "montoorigen")
    private Double montoorigen;
    @Column(name = "montopendiente")
    private Double montopendiente;
    @DataTableColumn(order = 6, title = "Cliente", name = "cliente")
    @Column(name = "cliente")
    private Integer cliente;
    @Size(max = 45)
    @Column(name = "parent")
    private String parent;
    @Size(max = 45)
    @Column(name = "nombre")
    @DataTableColumn(order = 7, title = "Nombre", name = "nombre")
    private String nombre;
    @Size(max = 45)
    @Column(name = "mailing")
    private String mailing;
    @Size(max = 45)
    @Column(name = "name")
    private String name;
    @Size(max = 45)
    @Column(name = "codigoRep")
    private String codigoRep;
    @Size(max = 45)
    @Column(name = "repventas")
    private String repventas;
    @Size(max = 45)
    @Column(name = "zonaventas")
    private String zonaventas;
    @Size(max = 45)
    @Column(name = "segmento")
    private String segmento;
    @Size(max = 45)
    @Column(name = "bu")
    private String bu;
    @Size(max = 45)
    @Column(name = "glOffset")
    private String glOffset;
    @Size(max = 45)
    @Column(name = "producto")
    private String producto;
    @Size(max = 45)
    @Column(name = "descproducto")
    private String descproducto;
    @Size(max = 45)
    @Column(name = "catcode29")
    private String catcode29;
    @Size(max = 45)
    @Column(name = "dec_cc29")
    private String decCc29;
    @Size(max = 45)
    @Column(name = "searchtype")
    private String searchtype;
    @Size(max = 45)
    @Column(name = "pterm")
    private String pterm;
    @Size(max = 45)
    @Column(name = "code")
    private String code;
    @Size(max = 45)
    @Column(name = "paymentterms")
    private String paymentterms;
    @Column(name = "creditlimit")
    private Float creditlimit;
    @Size(max = 45)
    @Column(name = "ranking")
    private String ranking;
    @Size(max = 45)
    @Column(name = "credmessage")
    private String credmessage;
    @Size(max = 45)
    @Column(name = "tempcrmessage")
    private String tempcrmessage;
    @Size(max = 45)
    @Column(name = "referencia")
    private String referencia;
    @Size(max = 100)
    @Column(name = "comentario")
    private String comentario;
    @Size(max = 200)
    @Column(name = "openorders")
    private String openorders;
    @Size(max = 45)
    @Column(name = "rpcrrm")
    private String rpcrrm;
    @Size(max = 45)
    @Column(name = "abac05")
    private String abac05;
    @JoinColumn(name = "cargadatos", referencedColumnName = "id")
    @ManyToOne(optional = false)
    private Cargadatos cargadatos;
    @Column(name = "unidadnegocio")
    private Integer unidadnegocio;
    @Column(name = "lineanegocio")
    private Integer lineanegocio;

    public Integer getUnidadnegocio() {
        return unidadnegocio;
    }

    public void setUnidadnegocio(Integer unidadnegocio) {
        this.unidadnegocio = unidadnegocio;
    }

    public Integer getLineanegocio() {
        return lineanegocio;
    }

    public void setLineanegocio(Integer lineanegocio) {
        this.lineanegocio = lineanegocio;
    }

    public AsoffStore() {
    }

    public AsoffStore(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getCompania() {
        return compania;
    }

    public void setCompania(Integer compania) {
        this.compania = compania;
    }

    public String getTdocto() {
        return tdocto;
    }

    public void setTdocto(String tdocto) {
        this.tdocto = tdocto;
    }

    public String getNodocto() {
        return nodocto;
    }

    public void setNodocto(String nodocto) {
        this.nodocto = nodocto;
    }

    public Date getFechaemision() {
        return fechaemision;
    }

    public void setFechaemision(Date fechaemision) {
        this.fechaemision = fechaemision;
    }

    public Double getMontoorigen() {
        return montoorigen;
    }

    public void setMontoorigen(Double montoorigen) {
        this.montoorigen = montoorigen;
    }

    public Double getMontopendiente() {
        return montopendiente;
    }

    public void setMontopendiente(Double montopendiente) {
        this.montopendiente = montopendiente;
    }

    public Integer getCliente() {
        return cliente;
    }

    public void setCliente(Integer cliente) {
        this.cliente = cliente;
    }

    public String getParent() {
        return parent;
    }

    public void setParent(String parent) {
        this.parent = parent;
    }

    public String getNombre() {
        return nombre;
    }

    public void setNombre(String nombre) {
        this.nombre = nombre;
    }

    public String getMailing() {
        return mailing;
    }

    public void setMailing(String mailing) {
        this.mailing = mailing;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCodigoRep() {
        return codigoRep;
    }

    public void setCodigoRep(String codigoRep) {
        this.codigoRep = codigoRep;
    }

    public String getRepventas() {
        return repventas;
    }

    public void setRepventas(String repventas) {
        this.repventas = repventas;
    }

    public String getZonaventas() {
        return zonaventas;
    }

    public void setZonaventas(String zonaventas) {
        this.zonaventas = zonaventas;
    }

    public String getSegmento() {
        return segmento;
    }

    public void setSegmento(String segmento) {
        this.segmento = segmento;
    }

    public String getBu() {
        return bu;
    }

    public void setBu(String bu) {
        this.bu = bu;
    }

    public String getGlOffset() {
        return glOffset;
    }

    public void setGlOffset(String glOffset) {
        this.glOffset = glOffset;
    }

    public String getProducto() {
        return producto;
    }

    public void setProducto(String producto) {
        this.producto = producto;
    }

    public String getDescproducto() {
        return descproducto;
    }

    public void setDescproducto(String descproducto) {
        this.descproducto = descproducto;
    }

    public String getCatcode29() {
        return catcode29;
    }

    public void setCatcode29(String catcode29) {
        this.catcode29 = catcode29;
    }

    public String getDecCc29() {
        return decCc29;
    }

    public void setDecCc29(String decCc29) {
        this.decCc29 = decCc29;
    }

    public String getSearchtype() {
        return searchtype;
    }

    public void setSearchtype(String searchtype) {
        this.searchtype = searchtype;
    }

    public String getPterm() {
        return pterm;
    }

    public void setPterm(String pterm) {
        this.pterm = pterm;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getPaymentterms() {
        return paymentterms;
    }

    public void setPaymentterms(String paymentterms) {
        this.paymentterms = paymentterms;
    }

    public Float getCreditlimit() {
        return creditlimit;
    }

    public void setCreditlimit(Float creditlimit) {
        this.creditlimit = creditlimit;
    }

    public String getRanking() {
        return ranking;
    }

    public void setRanking(String ranking) {
        this.ranking = ranking;
    }

    public String getCredmessage() {
        return credmessage;
    }

    public void setCredmessage(String credmessage) {
        this.credmessage = credmessage;
    }

    public String getTempcrmessage() {
        return tempcrmessage;
    }

    public void setTempcrmessage(String tempcrmessage) {
        this.tempcrmessage = tempcrmessage;
    }

    public String getReferencia() {
        return referencia;
    }

    public void setReferencia(String referencia) {
        this.referencia = referencia;
    }

    public String getComentario() {
        return comentario;
    }

    public void setComentario(String comentario) {
        this.comentario = comentario;
    }

    public String getOpenorders() {
        return openorders;
    }

    public void setOpenorders(String openorders) {
        this.openorders = openorders;
    }

    public String getRpcrrm() {
        return rpcrrm;
    }

    public void setRpcrrm(String rpcrrm) {
        this.rpcrrm = rpcrrm;
    }

    public String getAbac05() {
        return abac05;
    }

    public void setAbac05(String abac05) {
        this.abac05 = abac05;
    }

    public Cargadatos getCargadatos() {
        return cargadatos;
    }

    public void setCargadatos(Cargadatos cargadatos) {
        this.cargadatos = cargadatos;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += ( id != null ? id.hashCode() : 0 );
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!( object instanceof AsoffStore )) {
            return false;
        }
        AsoffStore other = (AsoffStore) object;
        if (( this.id == null && other.id != null ) || ( this.id != null && !this.id.equals(other.id) )) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "net.easoftware.code.beans.jpa.AsoffStore[ id=" + id + " ]";
    }

    public Date getFechavencimiento() {
        return fechavencimiento;
    }

    public void setFechavencimiento(Date fechavencimiento) {
        this.fechavencimiento = fechavencimiento;
    }
}
